@(message: String)

<!DOCTYPE html>

<html>
    <head>
        <title>Badugi Poker Game</title>
        <link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
        <link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
		<style>
        .msg {
        	border: 1px solid;
        	border-radius: 10px;
        	margin-top: 2px;
        	margin-bottom: 2px;
        	background:#CCCCB2;
        }
        </style>
    </head>
    <body style = "background:#000000">
    	<header style="background:#000000; height:80px; box-shadow: 10px 10px 5px #888888; margin-right:-40px; margin-left:-40px; margin-top:-10px">
    	<div style="margin-left:25%; margin-right:25%"><img alt="" src="@routes.Assets.at("images/logo.png")"></img></div>
    	</header>
	    <div style="margin-left:25%; margin-right:25%; margin-top: 5%">
	    	<h1 style = "color:#FFFFFF">@message</h1>
		<button id="start" onclick="start2()" autofocus>START</button>
			<div>
		    	<div id="div2">
		    		<div class="msg">@message</div>
		    	</div>
		    </div>
	    </div>

       <script>
        function load()
        {
    		var xmlhttp;
    		if (window.XMLHttpRequest)
    		  {// code for IE7+, Firefox, Chrome, Opera, Safari
    		  xmlhttp=new XMLHttpRequest();
    		  }
    		else
    		  {// code for IE6, IE5
    		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    		  }
    		xmlhttp.onreadystatechange=function()
    		  {
    		  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    		    {
	    			var str = xmlhttp.responseText;
	    			if (str.trim())
	    				{
			    		  	var str2 = str.replace("***", "*");
							var stra = str.split("*");
							var i = 0;
							for (i = 0; i < stra.length; i++)
							{
								if (stra[i].trim())
									{
							          var para = document.createElement("div");
							          para.className = "msg";
							          var para2 = document.createElement("p");
							          para.appendChild(para2);
							          var node = document.createTextNode(stra[i]);
							          para2.appendChild(node);
							          var element = document.getElementById("div2");
							          element.insertBefore(para, element.childNodes[0]);
									}
							}
	    				}

    		    }
    		}
    		xmlhttp.open("GET","/chat", true);
    		xmlhttp.send();       	
        }
       var myVar = setInterval(function(){ load() }, 2000)

        </script>
    </body>
	<script>
	function start2()
	{
		window.location="/start"
	}
	</script>    

</html>
